package com.lagou.homework123;

/**
 * 手机卡类
 * 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量
 * 行为：显示（卡号 + 用户名 + 当前余额）
 */
public class SimCard {

    private SimCardType cardType;
    private String cardId;
    private String userName;
    private String password;
    private int accountBalance;
    private int talkTime;
    private int cellularData;

    public SimCard(SimCardType cardType, String cardId, String userName, String password, int accountBalance, int talkTime, int cellularData) {
        this.cardType = cardType;
        this.cardId = cardId;
        this.userName = userName;
        this.password = password;
        this.accountBalance = accountBalance;
        this.talkTime = talkTime;
        this.cellularData = cellularData;
    }

    public void showSimCardInfo() {
        System.out.println("卡号：" + cardId + "，用户名：" + userName + "，当前余额：" + accountBalance + "元");
        System.out.println("---------------------------------------------");
    }

    public String convertSimCardType() {
        if (cardType == SimCardType.Standard)
            return "大卡";
        else if (cardType == SimCardType.Mini)
            return "小卡";
        else
            return "微型卡";
    }

    public SimCardType getCardType() {
        return cardType;
    }

    public void setCardType(SimCardType cardType) {
        this.cardType = cardType;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(int accountBalance) {
        this.accountBalance = accountBalance;
    }

    public int getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }

    public int getCellularData() {
        return cellularData;
    }

    public void setCellularData(int cellularData) {
        this.cellularData = cellularData;
    }
}
